<template>
    <div class="seek">
        <div class="cent">
            <div class="left" @click="gooff">
                <van-icon name="arrow-left" />
            </div>
            <div class="right">
                <form action="/">
                <van-search
                    v-model="value"
                    show-action
                    placeholder="请输入搜索关键词"
                    @search="onSearch"
                    @cancel="onCancel"
                />
            </form>
            </div>
        </div>
    </div>
</template>

<script>
    import { Toast } from 'vant';

    export default {
    data() {
        return {
        value: '',
        };
    },
    methods: {
        onSearch(val) {
        Toast(val);
        },
        onCancel() {
        // Toast('取消');
        },
        gooff() {
            this.$router.go(-1);
        }
    },
    };
</script>

<style scoped>
    .left {
        width: 7%;
        float: left;
        text-align: center;
        font-size: .25rem;
        line-height: .54rem;
    }
    .right {
        width: 93%;
        float: right;
    }
</style>

